
let jwtAuth = require('../middleware/jwtAuth')

module.exports = app => {

  //实现登陆拦截
  app.use('/api', jwtAuth)

  app.get('/api', (req, res) => {
    res.json({ message: '欢迎使用小厨房服务！' });
  })

  app.use('/api/user/', require('./users.js'))
  app.use('/api/recipe/', require('./recipe.js'))

}
